package com.adams.access.db.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 
 * File Name : ViewWin.java
 * 
 * @Description : 页面窗口实体
 */
@Entity
@Table(name = "T_VIEW_WIN_INFO")
public class ViewWin extends EntityObject
{

	private static final long serialVersionUID = -6299216242043243598L;

	@Column(name = "TITLE")
	private String title;// 标题

	@Column(name = "XTYPE")
	private String xtype;// 类型
	public static String XTYPE_SEARCH = "dynamicQuery-win";
	public static String XTYPE_GRID = "dynamicGrid-win";

	@Column(name = "WIDTH")
	private String width;// 宽

	@Column(name = "HEIGHT")
	private String height;// 高

	@Column(name = "X")
	private int x;// x坐标

	@Column(name = "Y")
	private int y;// y坐标

	@Column(name = "WINTYPE")
	private String wintype;// 窗口类型 menuwin:菜单窗口 eventwin:事件窗口
	public static String WINTYPE_MENU = "menu_win";
	public static String WINTYPE_EVENT = "event_win";
	public static String WINTYPE_ITEM = "item_win";

	@Column(name = "MENUID")
	private Long menuid;// 菜单主键

	/**
	 * @return the title
	 */
	public String getTitle()
	{
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title)
	{
		this.title = title;
	}

	/**
	 * @return the xtype
	 */
	public String getXtype()
	{
		return xtype;
	}

	/**
	 * @param xtype
	 *            the xtype to set
	 */
	public void setXtype(String xtype)
	{
		this.xtype = xtype;
	}

	/**
	 * @return the width
	 */
	public String getWidth()
	{
		return width;
	}

	/**
	 * @param width
	 *            the width to set
	 */
	public void setWidth(String width)
	{
		this.width = width;
	}

	/**
	 * @return the height
	 */
	public String getHeight()
	{
		return height;
	}

	/**
	 * @param height
	 *            the height to set
	 */
	public void setHeight(String height)
	{
		this.height = height;
	}

	/**
	 * @return the x
	 */
	public int getX()
	{
		return x;
	}

	/**
	 * @param x
	 *            the x to set
	 */
	public void setX(int x)
	{
		this.x = x;
	}

	/**
	 * @return the y
	 */
	public int getY()
	{
		return y;
	}

	/**
	 * @param y
	 *            the y to set
	 */
	public void setY(int y)
	{
		this.y = y;
	}

	public Long getMenuid()
	{
		return menuid;
	}

	public void setMenuid(Long menuid)
	{
		this.menuid = menuid;
	}

	public String getWintype()
	{
		return wintype;
	}

	public void setWintype(String wintype)
	{
		this.wintype = wintype;
	}

	@Override
	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + id.hashCode();
		return result;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ViewWin other = (ViewWin) obj;
		if (id != other.id)
			return false;
		return true;
	}
}
